import CommonIcon from '_c/common-icon'
import {
  showTitle
} from '@/libs/util'
export default {
  components: {
    CommonIcon
  },
  methods: {
    showTitle(item) {
      return showTitle(item, this)
    },
    showChildren(item) {
      const bool = item.children && (item.children.length > 0 || (item.meta && item.meta.showAlways))
      return bool
    },
    getNameOrHref(item, children0) {
      const name = item.url ? `isTurnByHref_${item.url}` : (children0 ? item.children[0].name : item.name)
      return name
    }
  }
}
